package com.kedacom.cometd;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author luocanfeng
 * @date 2011-6-20 10:10:14
 */
@Controller
@RequestMapping("/")
public class IndexController {

	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String index(HttpServletRequest request, Model model) {

		return "cometd/index";
	}

	@RequestMapping(value = "/application/{username}", method = RequestMethod.GET)
	public String application(HttpServletRequest request, Model model, @PathVariable String username) {
		model.addAttribute("username", username);
		return "cometd/application";
	}

}
